package com.wavehi.exce.optional;

import org.junit.Test;

import java.util.Arrays;
import java.util.List;
import java.util.Optional;

/**
 * @Author WaveHi
 * @Date 27/8/2021 上午 10:53
 * @Version 1.0
 * @Contact HJBWaveHi@163.com
 * @Description Demonstrate the usr of Optional class
 */
public class OptionalDemo {

    @Test
    public void testOptionalUse1() {
        //获取Optional实例
        Optional<Integer> integer = Optional.of(10);
        @Deprecated
        var a = 10;
        int a1 = a;
        int i = a * 2;
        List<Integer> integers = Arrays.asList(12, 213, 23, 132, 323, 231);
    }

}
